<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../styles/easyui.css">
	<link rel="stylesheet" type="text/css" href="../styles/icon.css">
	<link rel="stylesheet" type="text/css" href="../styles/demo.css">
	<!-- <script type="text/javascript" src="../jquery/jquery.min.js"></script> -->
	<script type="text/javascript" src="../jquery/jquery.easyui.min.js"></script>
	<script src="http://apps.bdimg.com/libs/jquery/1.11.1/jquery.js"></script>
	<link rel="stylesheet" href="../styles/login.css" />
	<!-- <script type="text/javascript" src="../jquery/jquery.js"></script> -->
	<script type="text/javascript">
		$(document).ready(function() {
			$("#query").click(function() {
				$("#query_form").submit();
				/* alert("Submitted"); */
			});
			
		});
	</script>
		<!-- ajax查询 -->
	
	<script>
	$(document).ready(function(){ 
		$("#").click(function(){ 
			$.ajax({ 
			    type: "GET", 	
				url: "../books/queryrtjson.action"+$("#isbn").val()+$("#bookName").val()+$("#author").val()+$("#tag").val(),
					
				 dataType: "json", 
				
				success: function(data) {
					if (data.success) {
						$("#searchResult").html(data.msg);
					} else {
						$("#searchResult").html("出现错误：" + data.msg);
					}  
				},
				error: function(jqXHR){     
				   alert("发生错误：" + jqXHR.status);  
				},     
			});
		});
		
		$("#ajaxquery").click(function(){ 
			$.ajax({ 
			    type: "POST", 	
				url: "../books/queryrtjson.action",
				
				data: {
					"booksModel.isbn": $("#isbn").val(), 
					"booksModel.bookName": $("#bookName").val(), 
					"booksModel.author": $("#author").val(), 
					"booksModel.tag": $("#tag").val()
				},
				dataType: "json",
				success: function(data){
					if (data.success) { 
						$("#createResult").html(data.msg);
					} else {
						$("#createResult").html("出现错误：" + data.msg);
					}  
					 alert("出现:"+data.rows[0].isbn);
				},
				error: function(jqXHR){     
				   alert("发生错误：" + jqXHR.status);  
				},     
			});
		});
});
</script>
</head>
<body>

	<div class="global">
		<form name="query_form" id="query_form" action="../books/query.action"
			method="post">
			<div class="log log_in" tabindex='-1' id='dl'>
				<dl>
					<dt>
						<div class='header'>
							<h3>检&nbsp;索</h3>
						</div>
					</dt>
					<dt></dt>

					<dt>
						<div class='letter'>
							&nbsp;&nbsp;ISBN:&nbsp;<input type="text" name="booksModel.isbn" id="isbn" tabindex='1' />
						</div>
					</dt>
					<dt>
						<div class='letter'>
							书&nbsp;&nbsp;&nbsp;名:&nbsp;<input type="text" name="booksModel.bookName"
								id="bookName" tabindex='2' />
						</div>
					</dt>
					<dt>
						<div class='letter'>
							作&nbsp;&nbsp;&nbsp;者:&nbsp;<input type="text" name="booksModel.author"
								id="author" tabindex='5' />
						</div>
					</dt>
					<dt>
						<div class='letter'>
							标&nbsp;&nbsp;&nbsp;签:&nbsp;<input type="text" name="booksModel.tag"
								id="tag" tabindex='6' />
						</div>
					</dt>
					<dt>
						<div>
							<input type="button" name="query_bt" id="query"
								value='&nbsp查&nbsp询&nbsp' tabindex='3' /> 
						</div>
					</dt>
					<!-- ajax查询按钮 -->
					<!-- <dt>
						<div>
							<input type="button" name="ajaxquery_bt" id="ajaxquery"
								value='ajax&nbsp查&nbsp询&nbsp' tabindex='10' /> 
						</div>
					</dt> -->
					<p id="searchResult"></p>
				</dl>
			</div>
		</form>		
	</div>
	

</body>
</html>